package com.it.dao;

import com.it.Bean.Admin;

import java.util.List;

public interface AdminDao {

    /*
    * CRUD
    *
    * */

    /**
     * 登录验证
     * @param admin
     * @return
     */
    public Admin Login(Admin admin)throws Exception;
    /**
     *  //查询一个
     * @param id
     * @return
     */
    public Admin queryById(Integer id);
    //查询所有

    /**
     * 查询所有
     * sql select * from admin
     * @return List<Object>
     */
    public List<Admin> getQueryAll();

    /**
     *  //添加
     *  sql insert into admin values(?,?,?,?,?)
     * @param admin
     * @return
     */
    public boolean save(Admin admin);


    /**
     *  //修改
     *  sql update admin set username=?,password=? where id=?
     * @param admin
     * @return
     */
    public boolean update(Admin admin);


    /**
     * //删除
     * sql delete from admin where id=?
     * @param id
     * @return
     */
    public boolean delete(Integer id);



}
